/**
 * Project: push-center-biz-dal
 * 
 * File Created at 2014年10月9日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.dal.pushcenter;

import java.util.List;

import com.greenline.push.dal.pushcenter.dataobject.MsgRetryDO;
import com.greenline.push.dal.query.MsgRetryQuery;

/**
 * @Type AppChannelDAO
 * @Desc
 * @author shuai.zuo
 * @date 2014年10月9日
 * @Version V1.0
 */
public interface MsgRetryFullDAO {
    /**
     * 新增
     * 
     * @param appChannel
     * @return 新增数据的ID
     */
    Long insert(MsgRetryDO msgRetryDO);

    /**
     * 根据ID获取
     * 
     * @param id
     * @return AppChannelDO
     */
    MsgRetryDO getById(Long id);

    /**
     * 跟新
     * 
     * @param appChannel
     * @return -1 表示更新失败；>0 表示更新成功
     */
    int update(MsgRetryDO msgRetryDO);

    /**
     * 分页查询
     * 
     * @param query
     * @return
     */
    MsgRetryQuery listByQuery(MsgRetryQuery query);

    /**
     * 删除
     * 
     * @param id
     * @return -1 表示更新失败；>0 表示更新成功
     */
    int delete(Long id);

    List<MsgRetryDO> listByExample(MsgRetryDO msgRetryDO);

    List<MsgRetryDO> fetchMsgList(Long startId, Integer count, String appChannel);

    void updateAllSendStatus();

    int batchInsert(List<MsgRetryDO> msgRetryList);
}
